package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author jiang
 */
@Data
@ApiModel(value = "添加订单")
public class AddOrderForm {

    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺编号")
    @NotNull(message = "店铺编号不能为空")
    private String storeId;

    /**
     * 店铺名字
     */
    @ApiModelProperty(value = "店铺名字")
    @NotNull(message = "店铺名字不能为空")
    private String storeName;

    /**
     * 店铺电话
     */
    @ApiModelProperty(value = "店铺电话")
    @NotNull(message = "店铺电话不能为空")
    private String storePhone;

    /**
     * 菜品数组
     */
    @ApiModelProperty(value = "菜品数组")
    @NotNull(message = "菜品数组不能为空")
    @Valid
    private List<ProductForm> productIds;

    /**
     * 订单总额
     */
    @ApiModelProperty(value = "订单总额")
    @NotNull(message = "订单总额不能为空")
    private BigDecimal orderAmount;
    /**
     * 订单折算前总价
     */
    @ApiModelProperty(value = "订单折算前总价")
    @NotNull(message = "订单折算前总价不能为空")
    private BigDecimal orderDisAmount;
    /**
     * 送餐地址
     */
    @ApiModelProperty(value = "地址编号")
    @NotNull(message = "地址编号不能为空")
    private String userAddress;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
}
